#ifndef BASETRIGGER_H
#define BASETRIGGER_H

#include "BaseUnit.h"
#include "Rectangle.h"

//----------------------------
// Copyright 2009, foxblock, Howard C. Shaw III
// Base Trigger class, you cannot create this directly use an inheritance instead
//
// Override hit to supply the effect of the trigger.
//
//----------------------------

class BaseTrigger : public BaseUnit
{
    public:
        BaseTrigger(const Vector2df p, const Vector2df s);
        virtual ~BaseTrigger();

        virtual void hit(const SimpleDirection dir, BaseUnit* player, CRstring parameter="")=0;  // Handles any hit occuring with the player
        virtual void hitMap(MapData* const data, const CollisionObject* const obj);   // Handles any collision with the map
        void render();
        void update();
        void updateScreenPosition(const Vector2df mapOffset);
        virtual Vector2df getScreenPosition() const;

    protected:
        Vector2df m_screenPosition;
        #ifdef _DEBUG
        Rectangle rect;
        #endif
    private:
};

#endif // BASETRIGGER_H

